<template>
<div class="notice_list">
  <el-page-header @back="goBack" content="已发布通知">
  </el-page-header>
  <div v-for="item in this.notice" style="margin-top: 50px">
  <el-card style="margin-bottom: 50px">
    <div slot="header" class="clearfix">
      <span><p style="color: #55a1ff">发布时间：{{item.createTime}}</p></span>
    </div>

    <div>
      <h1 style="color: #55a1ff">通知内容：</h1>
      {{item.noticeContent}}
    </div>
  </el-card>
    <el-divider></el-divider>
  </div>
</div>
</template>

<script>
import {getNoticeList} from "@/api/admin_api";

export default {
  name: "notice_list",
  data(){
    return{
      notice:[
          {noticeContent:'明天下午大家到物业完善家庭信息',createTime:'2022-09-11 10:45:41'},
          {noticeContent:'特殊时期大家一定要做好疫情防控工作，每天出门必须戴口罩！',createTime:'2022-09-11 10:45:41'}
      ]
    }
  },
  created() {
    getNoticeList().then((res)=>{
      this.notice = res.data.data;
    })
  },
  methods:{
    goBack(){
      //返回上一页面
      // history.back();
      this.$router.push("/admin");
    }
  }
}
</script>

<style scoped>

</style>